package com.majie.postProcessor;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;

import java.util.Iterator;

public class MyBeanFactoryPostProcessor implements BeanFactoryPostProcessor {
	@Override
	public void postProcessBeanFactory(ConfigurableListableBeanFactory configurableListableBeanFactory) throws BeansException {
		Iterator<String> beanNamesIterator = configurableListableBeanFactory.getBeanNamesIterator();
		while (beanNamesIterator.hasNext()) {
			System.out.println("postProcessBeanFactory:" + beanNamesIterator.next());
		}
	}
}